package com.zhuanzhuan.hero.user.facade.label;

import com.bj58.spat.scf.server.contract.annotation.ServiceBehavior;
import com.bj58.zhuanzhuan.zzentry.common.service.entity.ServiceHeaderEntity;
import com.bj58.zhuanzhuan.zzentry.common.service.entity.ZZOpenScfBaseResult;
import com.bj58.zhuanzhuan.zzentry.common.service.model.openEntry.ZZHeader;
import com.bj58.zhuanzhuan.zzentry.common.service.model.openEntry.ZZMethod;
import com.bj58.zhuanzhuan.zzentry.common.service.model.openEntry.ZZParam;
import com.zhuanzhuan.hero.user.dto.label.QueryBrandModelLabelDTO;
import com.zhuanzhuan.hero.user.service.HeroLabelInfoService;
import com.zhuanzhuan.hero.user.vo.label.LevelLabelVO;
import lombok.extern.slf4j.Slf4j;

import javax.annotation.Resource;
import java.util.List;
import java.util.Objects;

/**
 * @ClassName ContentCategoryFacadeImpl
 * @Description
 * @Author hanjunjun
 * @Date 2024/6/26 17:28
 */
@ServiceBehavior
@Slf4j
public class ContentCategoryFacadeImpl implements ContentCategoryFacade {

    @Resource
    private HeroLabelInfoService labelInfoService;

    @ZZMethod(value = "queryBrandModelLabels", desc = "查询内容分类标签", publicAccess = false)
    @Override
    public ZZOpenScfBaseResult<List<LevelLabelVO>> queryBrandModelLabels(@ZZHeader ServiceHeaderEntity header,
        @ZZParam("param") QueryBrandModelLabelDTO queryBrandModelLabelDTO) {
        if (Objects.isNull(queryBrandModelLabelDTO)) {
            queryBrandModelLabelDTO = new QueryBrandModelLabelDTO();
        }
        return ZZOpenScfBaseResult.buildSucc(labelInfoService.queryContentCategoryLabels(queryBrandModelLabelDTO));
    }
}
